

import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.text.DecimalFormat;

public class Test {


    public static void main(String[] args) throws Exception {

        /*BigDecimal bigA = new BigDecimal(Double.toString(10));
        BigDecimal bigB = new BigDecimal(Double.toString(3));
        double res = bigA.divide(bigB,10,BigDecimal.ROUND_HALF_UP).doubleValue();
        System.out.println(res);*/

        /*double a = 654123/100;
        double b = 123.456789;
        System.out.println(a);
        System.out.println(b);*/

        DecimalFormat df=new DecimalFormat("0.00");//设置保留位数

        System.out.println(df.format( ((double)10)/3));

        double a = 10;
        int b = 3;
        System.out.println(a/b);
        //double c = a/b;
        double c = Double.valueOf("654321")/100;
        System.out.println(new DecimalFormat("0.00").format(Double.valueOf("654321")/100));

    }


    /*public static void main(String[] args) throws Exception {

        while (true){
            MyClassLoader myClassLoader = new MyClassLoader();
            Class c = myClassLoader.loadClass("MyManager");
            Method m = c.getMethod("logic");
            m.invoke(c.newInstance());
            Thread.sleep(5000);
        }

    }*/


}
